package com.my.study.atomic;

import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.ThreadLocalRandom;

/**
 * @author Carlos
 * @version 1.0
 * @Description TODO
 * @date 2021/6/5 10:39
 **/
@Slf4j(topic = "c.ThreadLocalRandomTest")
public class ThreadLocalRandomTest {

    public static void main(String[] args) {

        Thread thread = new Thread(() -> {
            ThreadLocalRandom current = ThreadLocalRandom.current();
            int i = current.nextInt();
            log.debug("{}", i);
        });

        thread.start();

        int i = 1;
        i ^= i << 13;
        System.out.println(i);

        int j = 1;
        j = j << 13 ^ j;
        System.out.println(j);


        int maxValue = Integer.MAX_VALUE;
        System.out.println(maxValue);
        int result = maxValue << 1;
        System.out.println(result);
    }



}
